#ifndef CURRENTPOINTSTORE_H
#define CURRENTPOINTSTORE_H

#include <QObject>
#include <QMutex>
#include"DataType/ControlPointStruct.h"

class CurrentPointStore : public QObject
{
    Q_OBJECT
public:

    static CurrentPointStore* getInstance();

    QList<ControlPointStruct> currentPointList() const;
    bool isHaveThisPoint(const ControlPointStruct &controlPoint);
    void insert(const ControlPointStruct &controlPoint);
    void insert(const QList<ControlPointStruct> &controlPointList);
    void clearnMap();

private:
    CurrentPointStore(QObject *parent = 0);
    CurrentPointStore(const CurrentPointStore &);
    CurrentPointStore &operator=(const CurrentPointStore &);

    static CurrentPointStore* m_pInstance;
    static QMutex m_Mutex;
    QMap<quint16,quint16> m_currentPointMap;

};

#endif // CURRENTPOINTSTORE_H
